$("button").click(function () {
    var target = this.attr("data-target");
    $(target).hide();
});
